/*
* JsonReader
*/

///////////////////////////////////////////////////////////////////////////////
minjs.JsonDataProvider = function(url){
	this.getUrl = function(){return url;}
}

minjs.JsonDataProvider.prototype.load = function(params, onloaded, onfailed){
	new Ajax().send(this.getUrl(), 
					params, 
					function(json){
						var result = eval("(" + json + ")");
						if(result.success)
							onloaded(result.rows);
						else onfailed(200, result.error);
					}, 
					function(status, text){
						onfailed(status, text);
					});
}

